#include <stdio.h>

int add(int a,int b)
{
    return a + b;
}
int minus(int a,int b)
{
    return a - b;
}

typedef int (*funPtr)(int,int);
int main()
{
    //函数指针的定义
    funPtr p = add;
    printf("%d\n",p(1,2));

    p = minus;
    printf("%d\n",p(1,2));

    return 0;
}